package com.greensam.pixelengine.pojo.entity;

import com.greensam.pixelengine.pojo.base.BaseEntity;
import com.greensam.pixelengine.pojo.emuns.StatusEnum;
import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Comment;

/**
 * @author Macro_Ray
 * @since 2025/6/19 14:51
 */
@Getter
@Setter
@Entity
@Table(name = "role_info", indexes = {
        @Index(name = "idx_code", columnList = "code")
})
@Comment("角色信息表")
public class RolePo extends BaseEntity {

    @Column(nullable = false, length = 32)
    @Comment("角色名称")
    private String name;

    @Column(length = 32)
    @Comment("角色描述")
    private String description;

    @Column(nullable = false, length = 32)
    @Comment("角色标识")
    private String code;

    @Column(nullable = false, length = 20)
    @Comment("排序")
    private Integer sort;

    @Column(nullable = false)
    @Comment("状态")
    @Enumerated(value = EnumType.STRING)
    private StatusEnum status;
}
